![]() |
PATH![]() |
![]() ![]() |
The
NavCustomControlMessage
data type defines constants that your application can pass in the
selector
parameter of the
NavCustomControl
function NavCustomControl
to control various aspects of the active dialog box.
enum {
kNavCtlShowDesktop = 0,/* show desktop, parms = nil */
kNavCtlSortBy = 1,/* set sort key field,
parms->NavSortKeyField */
kNavCtlSortOrder = 2,/* set sort order,
parms->NavSortOrder */
kNavCtlScrollHome = 3,/* scroll list home,parms = nil */
kNavCtlScrollEnd = 4,/* scroll list end,parms = nil */
kNavCtlPageUp = 5,/* page list up,parms = nil */
kNavCtlPageDown = 6,/* page list down,parms = nil */
kNavCtlGetLocation = 7,/* get current location,
parms<-AEDesc */
kNavCtlSetLocation = 8,/* set current location,
parms->AEDesc */
kNavCtlGetSelection = 9,/* get current selection,
parms<-AEDescList */
kNavCtlSetSelection = 10,/* set current selection,
parms->AEDescList*/
kNavCtlShowSelection = 11,/* make selection visible,
parms = nil */
kNavCtlOpenSelection = 12,/* open view of selection,
parms = nil */
kNavCtlEjectVolume = 13,/* eject volume,parms->vRefNum */
kNavCtlNewFolder = 14,/* create a new folder,
parms->StringPtr */
kNavCtlCancel = 15,/* cancel dialog,parms = nil */
kNavCtlAccept = 16,/* accept default,parms = nil */
kNavCtlIsPreviewShowing = 17,/* get preview status,
parms<-Boolean */
kNavCtlAddControl = 18,/* add 1 control,
parms->ControlHandle */
kNavCtlAddControlList = 19,/* add control list to dialog,
parms->Handle (DITL rsrc) */
kNavCtlGetFirstControlID = 20,/* get 1st cntrl ID,parms<-UInt16 */
kNavCtlSelectCustomType = 21,/* select a custom menu item,
parms->NavMenuItemSpec */
kNavCtlSelectAllType = 22,/* select "All" menu item,
parms->SInt16 */
kNavCtlGetEditFileName = 23,/* get save filename,
parms<-StringPtr */
kNavCtlSetEditFileName = 24,/* set save filename,
parms->StringPtr */
kNavCtlSelectEditFileName = 25 /* select save filename,
parms->ControlEditTextSelectionRec
(v 1.1 only) */
};
typedef SInt32 NavCustomControlMessage;
NavCustomControl
. For a description of the
NavSortKeyField
constants, see File Sorting Constants.IMPORTANT
To avoid any unnecessary flickering or redrawing, ensure the control is initially invisible before specifying this constant. You may set the control to visible after Navigation Services supplies the kNavCBStart constant, described in Event Message Constants , in the param field of the structure of type
NavCBRec
. If the user resizes the dialog box, your application must move the control because it is not maintained by Navigation Services. If you use the kNavCtlAddControlList constant (described next) and you supply a 'DITL' resource, you avoid the need to move the control yourself.
IMPORTANT
Take care to test the result from FindDialogItem to ensure that it describes a control that you defined. Your application must not respond to any controls that do not belong to it.
NavMenuItemSpec
in the
parms
parameter of the
NavCustomControl
function. This structure describes the item you wish to have selected. For more information on providing custom menu items, see Customizing Type Pop-up Menus.NavCustomControl
, you can set the default item to All <AppName> Documents, All Readable Documents or All Documents.NavPutFile
. This would be useful if you wanted to automatically add an extension to the filename, for example. When you send this message, the
parms
parameter of the
NavCustomControl
function returns a
StringPtr
to a Pascal string containing the filename.NavPutFile
. Your application normally specifies the
KNavCtlSetEditFileName
constant after modifying the filename obtained by specifying the
kNavCtlGetEditFileName
constant. In addition to specifying the
kNavCtlSetEditFileName
constant, your application must pass a
StringPtr
to a Pascal string containing the filename in the
parms
parameter of the
NavCustomControl
function.NavPutFile
with some or all of the filename string highlighted for selection. In addition to specifying the
kNavCtlSelectEditFileName
constant, your application passes a Control Manager structure of type
ControlEditTextSelectionRec
in the
parms
parameter of the
NavCustomControl
function in order to specify which part of the filename string to highlight. For more information on the
ControlEditTextSelectionRec
structure, see
Mac OS 8 Toolbox Reference
.Previous | Back Up One Level | Next |